Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Validation & response serialization improvements #152

Merged
merged 3 commits into from
Mar 26, 2024

Conversation

blomqma
Copy link
Owner

@blomqma blomqma commented Mar 26, 2024

No description provided.

blomqma added 3 commits March 26, 2024 22:44
This fixes a bug where the Zod-parsed request
body accessed via `req.json()` had potentially
incorrect types due to JSON serialization. Now
the `json()` method is overridden so that the parsed
data is returned as is without the JSON serialization.

Additionally, the request path parameters are now also
validated when using app router when previously they
were used only for providing types for the used path
parameters.
This change serializes Blob data for API routes
and creates a JSON object from form responses,
although these are rare cases.
Copy link

vercel bot commented Mar 26, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
next-rest-framework ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 26, 2024 11:01pm
next-rest-framework-demo ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 26, 2024 11:01pm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant